<template>
    <div class="wrapper">
       我是爸爸，引用了爷爷的{{value1}}
       <son @sonHandle='sonHandle' />
  </div>
</template>

<script>
import Son from '@/components/element-ui/ProvideAndInject/Son'
  export default {
    components: {Son},
    props: {},
    data (){
      return {
          father:'我是爸爸'
      }
    },
    inject:['value1'],
    provide(){
        return {
          father: this.father
        }
    },
    created (){},
    mounted (){},
    activated (){},
    updated (){},
    methods: {
      sonHandle(val){
        console.log('爸爸获取儿子的数据',val)
      }
    },
    computed: {},
    watch: {},
  }
</script>
<style scoped lang='scss'>
</style>